package chatper1

object demo1_var {
  def main(args: Array[String]): Unit = {
    // val 变量名:变量类型 = 初始值
    val a : Int = 10
    val a1 = 10
    println(a)
    println(a1)
    var b = 10
    println(b)
    b = 5
    println(b)
  }
  var test:demo1_var = new demo1_var()
}

//伴生对象
class demo1_var{
  var i : Int = _
}
